package com.lixueju.security.box.validate.code.sms;

import com.lixueju.security.box.validate.code.ValidateCodeException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.context.request.ServletWebRequest;

/**
 * @author lixueju
 * @since 2019/10/4 11:41
 **/
public class DefaultSmsValidateCodeSender implements SmsValidateCodeSender {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void send(ServletWebRequest request, String mobile, String code) {
        logger.warn("请配置真实的短信验证码发送器(SmsCodeSender)");
        logger.info("向手机" + mobile + "发送短信验证码" + code);
        throw new ValidateCodeException("向手机" + mobile + "发送短信验证码" + code);
    }
}
